<div class="layuimini-container">
    <form id="app-form" class="layui-form layuimini-form">

        <div class="layui-form-item">
            <label class="layui-form-label required">店铺类型</label>
            <div class="layui-input-block">
                <select name="cate_id" class="layui-input"
                        lay-verify="required" data-select="{:url('shop.cate/index')}" data-fields="id,title"
                        data-value="{$row.cate_id|default=''}">
                </select>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">店铺名称</label>
            <div class="layui-input-block">
                <input type="text" name="title" class="layui-input" lay-verify="required" placeholder="请输入店铺名称" value="{$row.title|default=''}">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">联系电话</label>
            <div class="layui-input-block">
                <input type="text" name="store_mobile" class="layui-input" lay-verify="required" placeholder="请输入联系电话"
                       value="{$row.store_mobile}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">营业时间</label>
            <div class="layui-input-block">
                <input type="text" id="start_at" name="business_start" class="layui-input business-time" lay-verify="required" placeholder="请输入开门时间"
                       value="{$row.business_start}">
                <input type="text" id="end_at" name="business_end" class="layui-input business-time" lay-verify="required" placeholder="请输入打烊时间"
                       value="{$row.business_end}">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">商户号</label>
            <div class="layui-input-block">
                <input type="text" name="merchant_id" class="layui-input"  placeholder="请输入商户号"
                       value="{$row.merchant_id|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">绑定微信用户id</label>
            <div class="layui-input-block">
                <input type="text" name="bind_user" class="layui-input" lay-verify="required" placeholder="请输入绑定微信用户" value="{$row.bind_user|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">简介</label>
            <div class="layui-input-block">
                <input type="text" name="brief" class="layui-input" lay-verify="required" placeholder="请输入简介" value="{$row.brief|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">店铺封面</label>
            <div class="layui-input-block layuimini-upload">
                <input name="shop_cover" class="layui-input layui-col-xs6" lay-verify="required" placeholder="请上传店铺封面" value="{$row.shop_cover}">
                <div class="layuimini-upload-btn">
                    <span><a class="layui-btn" data-upload="shop_cover" data-upload-number="one" data-upload-exts="ico|png|jpg|jpeg"><i class="fa fa-upload"></i> 上传</a></span>
                    <span><a class="layui-btn layui-btn-normal" id="select_shop_cover" data-upload-select="shop_cover" data-upload-number="one"><i class="fa fa-list"></i> 选择</a></span>
                </div>
            </div>
        </div>
<!--        <div class="layui-form-item">-->
<!--            <label class="layui-form-label required">店铺图集</label>-->
<!--            <div class="layui-input-block layuimini-upload">-->
<!--                <input name="album" class="layui-input layui-col-xs6" lay-verify="required" placeholder="请输入店铺图集" value="{$row.album}">-->
<!--                <div class="layuimini-upload-btn">-->
<!--                    <span><a class="layui-btn" data-upload="album" data-upload-number="more" data-upload-exts="png|jpg|ico|jpeg|gif" data-upload-icon="image"><i class="fa fa-upload"></i> 上传</a></span>-->
<!--                    <span><a class="layui-btn layui-btn-normal" id="select_album" data-upload-select="album" data-upload-number="more" data-upload-mimetype="image/*"><i class="fa fa-list"></i> 选择</a></span>-->
<!--                </div>-->
<!--            </div>-->
<!--        </div>-->
<!--        <div class="layui-form-item">-->
<!--            <label class="layui-form-label">店铺状态</label>-->
<!--            <div class="layui-input-block">-->
<!--                <input type="text" name="status" class="layui-input" lay-verify="required" placeholder="请输入店铺状态" value="{$row.status|default=''}">-->
<!--            </div>-->
<!--        </div>-->

        <div class="layui-form-item">
            <label class="layui-form-label">店铺地址</label>
            <div class="layui-input-block">
                <input type="text" id="place" name="address" class="layui-input" lay-verify="required" placeholder="请输入店铺地址" value="{$row.address}">
            </div>
        </div>

        <!-- 地图插件开始 -->
        <div class="layui-form-item">
            <div id="container"></div>
        </div>
        <!-- 地图插件结束 -->

        <div class="layui-form-item layui-hide">
            <label class="layui-form-label">经度</label>
            <div class="layui-input-block">
                <input type="text" name="lng" id="lng_val" class="layui-input" lay-verify="required"  placeholder="请输入经度" value="{$row.lng|default=''}">
            </div>
        </div>
        <div class="layui-form-item layui-hide">
            <label class="layui-form-label">纬度</label>
            <div class="layui-input-block">
                <input type="text" name="lat" id="lat_val" class="layui-input" lay-verify="required"  placeholder="请输入纬度" value="{$row.lat|default=''}">
            </div>
        </div>
        <div class="hr-line"></div>
        <div class="layui-form-item text-center">
            <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit>确认</button>
            <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">重置</button>
        </div>

    </form>
</div>

<link rel="stylesheet" href="__STATIC__/admin/css/shop/map.css?v={$version}" media="all">
<script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key={$map_key}&libraries=place"></script>
<script charset="utf-8" src="__STATIC__/admin/js/shop/map.js?v={:time()}"></script>